package com.ruoyi.cderp.domain;

import java.math.BigDecimal;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

/**
 * 生产工单对象 production_order
 *
 * @author ruoyi
 * @date 2025-06-11
 */
public class ProductionOrder extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 主键ID */
    private String id;

    /** 生产工单编号 */
    @Excel(name = "生产工单编号")
    private String code;

    /** 产品ID */
    private String productId;

    /** 产品编码 */
    @Excel(name = "产品编码")
    private String productCode;

    /** 产品名称 */
    @Excel(name = "产品名称")
    private String productName;

    /** 计划数量 */
    @Excel(name = "计划数量")
    private BigDecimal plannedQuantity;

    /** 实际数量 */
    @Excel(name = "实际数量")
    private BigDecimal actualQuantity;

    /** 计划开始时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "计划开始时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date plannedStartTime;

    /** 计划结束时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "计划结束时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date plannedEndTime;

    /** 实际开始时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "实际开始时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date actualStartTime;

    /** 实际结束时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "实际结束时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date actualEndTime;

    /** 状态(0:待开始,1:进行中,2:已完成,3:已取消) */
    @Excel(name = "状态(0:待开始,1:进行中,2:已完成,3:已取消)")
    private Long status;

    //审核状态
    @Excel(name = "审核状态")
    private String statusSh;
    //拒绝原因
    @Excel(name = "拒绝原因")
    private String refuseReason;

    /** 车间ID */
    private String workshopId;

    /** 车间名称 */
    @Excel(name = "车间名称")
    private String workshopName;

    public String getRefuseReason() {
        return refuseReason;
    }

    public void setRefuseReason(String refuseReason) {
        this.refuseReason = refuseReason;
    }

    public String getStatusSh() {
        return statusSh;
    }

    public void setStatusSh(String statusSh) {
        this.statusSh = statusSh;
    }

    //审核人
    private String approveBy;

    private Date approveTime;



    public void setId(String id)
    {
        this.id = id;
    }

    public String getId()
    {
        return id;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getApproveBy() {
        return approveBy;
    }

    public void setApproveBy(String approveBy) {
        this.approveBy = approveBy;
    }

    public Date getApproveTime() {
        return approveTime;
    }

    public void setApproveTime(Date approveTime) {
        this.approveTime = approveTime;
    }

    public void setProductId(String productId)
    {
        this.productId = productId;
    }

    public String getProductId()
    {
        return productId;
    }
    public void setProductCode(String productCode)
    {
        this.productCode = productCode;
    }

    public String getProductCode()
    {
        return productCode;
    }
    public void setProductName(String productName)
    {
        this.productName = productName;
    }

    public String getProductName()
    {
        return productName;
    }
    public void setPlannedQuantity(BigDecimal plannedQuantity)
    {
        this.plannedQuantity = plannedQuantity;
    }

    public BigDecimal getPlannedQuantity()
    {
        return plannedQuantity;
    }
    public void setActualQuantity(BigDecimal actualQuantity)
    {
        this.actualQuantity = actualQuantity;
    }

    public BigDecimal getActualQuantity()
    {
        return actualQuantity;
    }
    public void setPlannedStartTime(Date plannedStartTime)
    {
        this.plannedStartTime = plannedStartTime;
    }

    public Date getPlannedStartTime()
    {
        return plannedStartTime;
    }
    public void setPlannedEndTime(Date plannedEndTime)
    {
        this.plannedEndTime = plannedEndTime;
    }

    public Date getPlannedEndTime()
    {
        return plannedEndTime;
    }
    public void setActualStartTime(Date actualStartTime)
    {
        this.actualStartTime = actualStartTime;
    }

    public Date getActualStartTime()
    {
        return actualStartTime;
    }
    public void setActualEndTime(Date actualEndTime)
    {
        this.actualEndTime = actualEndTime;
    }

    public Date getActualEndTime()
    {
        return actualEndTime;
    }
    public void setStatus(Long status)
    {
        this.status = status;
    }

    public Long getStatus()
    {
        return status;
    }
    public void setWorkshopId(String workshopId)
    {
        this.workshopId = workshopId;
    }

    public String getWorkshopId()
    {
        return workshopId;
    }
    public void setWorkshopName(String workshopName)
    {
        this.workshopName = workshopName;
    }

    public String getWorkshopName()
    {
        return workshopName;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("orderNo", getCode())
            .append("productId", getProductId())
            .append("productCode", getProductCode())
            .append("productName", getProductName())
            .append("plannedQuantity", getPlannedQuantity())
            .append("actualQuantity", getActualQuantity())
            .append("plannedStartTime", getPlannedStartTime())
            .append("plannedEndTime", getPlannedEndTime())
            .append("actualStartTime", getActualStartTime())
            .append("actualEndTime", getActualEndTime())
            .append("status", getStatus())
            .append("workshopId", getWorkshopId())
            .append("workshopName", getWorkshopName())
            .append("remark", getRemark())
            .append("createBy", getCreateBy())
            .append("createTime", getCreateTime())
            .append("updateBy", getUpdateBy())
            .append("updateTime", getUpdateTime())
            .append("statusSh", getStatusSh())
            .append("refuseReason", getRefuseReason())
            .append("approveBy", getApproveBy())
            .append("approveTime", getApproveTime())
            .toString();
    }
}
